<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:68:"D:\zrhost\hzp\back\public/../application/admin/view/login/index.html";i:1500081817;s:70:"D:\zrhost\hzp\back\public/../application/admin/view/public/header.html";i:1500280246;s:70:"D:\zrhost\hzp\back\public/../application/admin/view/public/footer.html";i:1500081818;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">

	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>公众平台自助引擎-中微信通</title>
		<meta name="keywords" content="" />
		<meta name="description" content="一款免费开源的微信公众平台管理系统，是国内最完善移动网站及移动互联网技术解决方案。" />
		<link rel="shortcut icon" href="__PUBLIC__/favicon.ico" />
		<link href="__PUBLIC__/css/bootstrap.min.css" rel="stylesheet">
		<link href="__PUBLIC__/css/common.css" rel="stylesheet">
		<script type="text/javascript">
		</script>
		<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/util.js"></script>
		<script type="text/javascript" src="__PUBLIC__/js/require.js"></script>
		
	</head>

	<body data-skin="default" class=" ">
		<div class="loader" style="display:none">
			<div class="la-ball-clip-rotate">
				<div></div>
			</div>
		</div>
		<div class="head">
			<nav class="navbar navbar-default" role="navigation">
				<div class="container">
					<div class="navbar-header">
						<a class="navbar-brand" href="/">
							<img src="__PUBLIC__/images/logo.png" class="pull-left" width="110px" height="35px">
							<span class="version">1.0.0</span>
						</a>
					</div>
				</div>
			</nav>
		</div>
<div class="main">
	<div class="login">
		<div class="logo text-center">
			<a href="javascript:void(0);"><img src="__PUBLIC__/images/logo-219.png" width="220px" height="50px"></a>
		</div>
		<div class="panel panel-default">
			<div class="panel-body">
				<form action="" method="post" role="form" id="form1">
					<div class="form-group input-group">
						<span id="message" class="text-danger"></span>
					</div>
					<div class="form-group input-group">
						<div class="input-group-addon"><img src="__PUBLIC__/images/icon-user.png" alt="" /></div>
						<input name="username" type="text" id='user' class="form-control" placeholder="请输入用户名登录" value="" />
					</div>
					<div class="form-group input-group">
						<div class="input-group-addon"><img src="__PUBLIC__/images/icon-pass.png" alt="" /></div>
						<input name="password" type="password" id='pawd' class="form-control " placeholder="请输入登录密码" value="" />
					</div>
					<!--验证码输入框-->
					<div class="form-group input-group">
						<div class="input-group-addon"><img src="__PUBLIC__/images/icon-pass.png" alt="" /></div>
						<input name="verify" type="text" id='verify' class="form-control " placeholder="请输入验证码" value="" />
					</div>
					<!--验证码显示-->
					<div class="form-group input-group" style="margin: 0 auto;margin-bottom: 30px;">
						<img class="verify_img" id="verify_img" src="<?php echo url('Login/verify'); ?>" onClick="this.src='<?php echo url('Login/verify'); ?>'+'?'+Math.random()" title="点击获取">
					</div>
					
					<div class="login-submit text-center">
						<input type="button" id="submit" name="submit" value="登录" class="btn btn-primary" />
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
</div>
				</div>
			</div>
		</div>
	</div>
	<div class="container-fluid footer text-center" role="footer">
		<div class="friend-link" style="color:#000">
			<a href="http://www.zhongweixintong.com">QQ:553101513&nbsp;&nbsp;联系电话:010-64125951/64125035</a>
		</div>
		<div style="color:#000">
			<a href="http://www.zhongweixintong.com"><b>中微信通</b></a> v1.0.0 &copy; 2014-2017
			<a href="http://www.zhongweixintong.com">www.zhongweixintong.com</a>
		</div>
	</div>
</body>
</html>

<script>
	$("#submit").click(function(){
		var user = $('#user').val();
		var pawd = $('#pawd').val();
		var verify = $('#verify').val();
		if(user==''){
			util.message('账号不能为空', '', '');
			return false;
		}
		if(pawd==''){
			util.message('密码不能为空', '', '');
			return false;
		}
		if(verify==''){
			util.message('验证码不能为空', '', '');
			return false;
		}
		$.ajax({
	        url: "<?php echo url('Login/login'); ?>",
	        data:{'user':user,'pawd':pawd,'verify':verify},
	        type: "post",
	        dataType: "json",
	        success: function (data) {
	           if(data==1){
	           		location.href="<?php echo url('Index/index'); ?>";
	           }else if(data==2){
	           	util.message('密码错误', '', '');
	           }else if(data==3){
	           	util.message('账号错误', '', '');
	           }else{
	           		util.message('验证码错误', '', '');
	           }
	        }
    	});
	});
</script>
